package com.hspedu.newData.dmsxl.数组;
/**
 * @Author: yh
 * @description: 
 * @CreateTime: 2025-04-30 
 * @Version: 1.0
 */

public class LC1295统计位数为偶数的数字 {

    public int findNumbers(int[] nums) {
        int count = 0;
        for (int i = 0; i < nums.length; i++) {
            boolean numbered = isNumbered(nums[i]);
            if (numbered){
                count++;
            }
        }
        return count;

    }

    public boolean isNumbered(int num){
        int i = 0;

        while(num>0){
            num = num/10;
            i++;
        }

        return i%2==0;
    }
}
